<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>background</title>
	<script src="js/jquery.js"></script>
    <link href="js/bootstrap.min.css" rel="stylesheet">
    <link href="js/style.css" rel="stylesheet" type="text/css">
    <script src="js/bootstrap.min.js"></script>
</head>

<body style="margin:0;pading:0;">
<?php
include 'conn_mysql.php';
include 'sidebar.php';
?>

<div  style="width:50%;color:#DA4713;font-family:微软雅黑;font-size:14px;text-align:center;  margin:0 auto; margin-top:20px;">
  参与旅游人员（序号74以后，购买人只是联系人，不是报名旅游人员）
</div>




<div style="clear:right;width:80%;height:40px;margin-left:200px;margin-top:5px;border-bottom:1.5px solid #C9C9CA;">	
	<div style="clear:right;float:left;width:8%;height:40px;line-height:40px;text-align:center;"><a style="color:#3E3A39;font-family:微软雅黑;font-size:14px;">序号</a></div>
	<div style="clear:right;float:left;width:15%;height:40px;line-height:40px;text-align:center;"><a style="color:#3E3A39;font-family:微软雅黑;font-size:14px;">真实姓名</a></div>
	<div style="clear:right;float:left;width:5%;height:40px;line-height:40px;text-align:center;"><a style="color:#3E3A39;font-family:微软雅黑;font-size:14px;">性别</a></div>
	<div style="clear:right;float:left;width:15%;height:40px;line-height:40px;text-align:center;"><a style="color:#3E3A39;font-family:微软雅黑;font-size:14px;">电话</a></div>
	<div style="clear:right;float:left;width:23%;height:40px;line-height:40px;text-align:center;"><a style="color:#3E3A39;font-family:微软雅黑;font-size:14px;">身份证</a></div>
    <div style="clear:right;float:left;width:10%;height:40px;line-height:40px;text-align:center;"><a style="color:#3E3A39;font-family:微软雅黑;font-size:14px;">费用</a></div>
    <div style="clear:right;float:left;width:23%;height:40px;line-height:40px;text-align:center;"><a style="color:#3E3A39;font-family:微软雅黑;font-size:14px;">备注</a></div>
</div>

<?php

$id_self=$_REQUEST['id_self'];

//订单
$sql="SELECT openid,textarea,zhifu_monkey,pay_points,id_difang,banqi FROM `main_user` where id_self='$id_self' ";
$query = mysql_query($sql);
$row = mysql_fetch_array($query);

$openid=$row['openid'];
$textarea=$row['textarea'];
$zhifu_monkey=$row['zhifu_monkey'];
$pay_points=$row['pay_points'];
$id_difang=$row['id_difang'];
$banqi=$row['banqi'];




//对应活动
$sql="SELECT * FROM `lvyou_difang_info` where id='$id_difang' ";
$query = mysql_query($sql);

while($row = mysql_fetch_array($query)){
	
	     if($banqi==$row['banqi1'])
		 {
			 //费用
			 $chengren_price=$row['chengren1'];
			 $ertong_price=$row['ertong1'];
		 }
		 else  if($banqi==$row['banqi2'])
		 {
			 //费用
			 $chengren_price=$row['chengren2'];
			 $ertong_price=$row['ertong2'];
		 }
		 else if($banqi==$row['banqi3'])
		 {
			 //费用
			 $chengren_price=$row['chengren3'];
			 $ertong_price=$row['ertong3'];
		 }
		 else if($banqi==$row['banqi4'])
		 {
			 //费用
			 $chengren_price=$row['chengren4'];
			 $ertong_price=$row['ertong4'];
		 }	
		 else if($banqi==$row['banqi5'])
		 {
			 //费用
			 $chengren_price=$row['chengren5'];
			 $ertong_price=$row['ertong5'];
		 }
		 else if($banqi==$row['banqi6'])
		 {
			 //费用
			 $chengren_price=$row['chengren6'];
			 $ertong_price=$row['ertong6'];
		 }		 
		 	
	}

//购买人
$sql="SELECT * FROM `ecs_users` where openid='$openid' and openid!='' ";
$query = mysql_query($sql);
while($row = mysql_fetch_array($query)){

	if($row['sex']==0){
		$sex="保密";
	}
	if($row['sex']==1){
		$sex="男";
	}
	if($row['sex']==2){
		$sex="女";
	}
	
?>
	<div style="width:80%;height:40px;margin-left:200px;margin-top:5px;border-bottom:1px solid #C9C9CA;">	
   		 <div style="clear:right;float:left;width:8%;height:40px;line-height:40px;text-align:center;"><a style="color:#3E3A39;font-family:微软雅黑;font-size:14px;">0</a></div>
		<div style="float:left;width:15%;height:40px;line-height:40px;text-align:center;"><a style="color:#3E3A39;font-family:微软雅黑;font-size:14px;"><?php echo $row['real_name']."(购买人)";?></a></div>
		<div style="float:left;width:5%;height:40px;line-height:40px;text-align:center;"><a style="color:#3E3A39;font-family:微软雅黑;font-size:14px;"><?php echo $sex;?></a></div>
		<div style="float:left;width:15%;height:40px;line-height:40px;text-align:center;"><a style="color:#3E3A39;font-family:微软雅黑;font-size:14px;"><?php echo $row['mobile_phone'];?></a></div>
			
        <div style="float:left;width:23%;height:40px;line-height:40px;text-align:center;"><a style="color:#3E3A39;font-family:微软雅黑;font-size:14px;"><?php echo $row['shenfen_ID'];?></a></div>
		<div style="float:left;width:10%;height:40px;line-height:40px;text-align:center;"><a style="color:#3E3A39;font-family:微软雅黑;font-size:14px;"><?php echo $zhifu_monkey."元(驴币".$pay_points.")";?></a></div>

	    <div style="float:left;width:23%;height:40px;line-height:40px;text-align:center;"><a style="color:#3E3A39;font-family:微软雅黑;font-size:14px;"><?php echo $textarea;?></a></div>
		
	</div>
<?php	
}
?>


<?php

$id_self=$_REQUEST['id_self'];

$sql="SELECT * FROM `fu_user` where id='$id_self' ";

$query = mysql_query($sql);
$i=1;
$one_price="0";
while($row = mysql_fetch_array($query)){
	
	$one_price=$chengren_price;
	if($row['choose']==3){
		$sex="儿童";
		$one_price=$ertong_price;
	}
	if($row['choose']==1){
		$sex="男";
	}
	if($row['choose']==2){
		$sex="女";
	}
	
?>
	<div style="width:80%;height:40px;margin-left:200px;margin-top:5px;border-bottom:1px solid #C9C9CA;">	
		<div style="clear:right;float:left;width:8%;height:40px;line-height:40px;text-align:center;"><a style="color:#3E3A39;font-family:微软雅黑;font-size:14px;"><?php echo $i;?></a></div>
		<div style="float:left;width:15%;height:40px;line-height:40px;text-align:center;"><a style="color:#3E3A39;font-family:微软雅黑;font-size:14px;"><?php echo $row['name'];?></a></div>
		<div style="float:left;width:5%;height:40px;line-height:40px;text-align:center;"><a style="color:#3E3A39;font-family:微软雅黑;font-size:14px;"><?php echo $sex;?></a></div>
		<div style="float:left;width:15%;height:40px;line-height:40px;text-align:center;"><a style="color:#3E3A39;font-family:微软雅黑;font-size:14px;"><?php echo $row['phone'];?></a></div>	
        <div style="float:left;width:23%;height:40px;line-height:40px;text-align:center;"><a style="color:#3E3A39;font-family:微软雅黑;font-size:14px;"><?php echo $row['idcode'];?></a></div>
        <div style="float:left;width:10%;height:40px;line-height:40px;text-align:center;"><a style="color:#3E3A39;font-family:微软雅黑;font-size:14px;"><?php echo $one_price."元";?></a></div>
        <div style="float:left;width:23%;height:40px;line-height:40px;text-align:center;"><a style="color:#3E3A39;font-family:微软雅黑;font-size:14px;"></a></div>
		

		
	</div>
<?php	
$i++;}
?>




<script type="text/javascript">
window.onload=function(){
	clientWidth=document.body.clientWidth;//屏幕宽
	clientHeight=window.screen.availHeight;//屏幕高
}


</script>
</body>








